﻿using System.Collections.Generic;
using System.Data;
using Kaiser.Modules.Cubic.DomainModel.Board;
using Kaiser.Modules.Cubic.DomainModel.News;
using Kaiser.Modules.Cubic.DomainModel.Product;
using Kaiser.Models;
using Kaiser.Services;
using Kaiser.Modules.Cubic.ViewModel;

namespace Kaiser.Modules.Cubic.Repositories
{
    public interface IProductRepositorie : IRepositorieBase<ProductDetail>
    {
        DataGrid<DomainModel.Product.ProductDetail> SearchProduct(ProductSearch search, PagingInfo pageinfo);

        ProductDetail GetProduct(string id);

        /// <summary>
        /// 返回产品的列表通过分类
        /// </summary>
        /// <param name="categoryId"></param>
        /// <returns></returns>
 
        IList<ProductDetail> GetProductsByCategoryCode(string categoryId);

        /// <summary>
        /// 返回所有的产品分类(当ParentId为空时)
        /// </summary>
        /// <returns></returns>
 
        IList<ProductCategory> GetProductCateogrys(string categoryParentId);

        /// <summary>
        /// 返回产品分类的具体内容
        /// </summary>
        /// <param name="categoryId"></param>
        /// <returns></returns>
 
        ProductCategory GetProductCategory(string categoryId);



        /// <summary>
        /// 返回新闻列表通过新闻分类
        /// </summary>
        /// <param name="categoryId"></param>
        /// <returns></returns>
 
        IList<NewsDetail> GetNewsByCategoryCode(string categoryId);

 
        string AddMessage(Message msg);

        /// <summary>
        /// 返回新闻详细内容
        /// </summary>
        /// <param name="newsId"></param>
        /// <returns></returns>
 
        NewsDetail GetNews(string newsId);


        DataGrid<Photo> SearchProductPhoto(string productId,PagingInfo pageinfo );
        void InsertProductPhoto(Photo model);
        void UpdateProductPhoto(Photo model);
        void DelProductPhoto(string id);

        Photo GetProductPhoto(string id);
    }
}
